<template>
    <div id="title" style="margin-left: 150px">
        <!--<el-select v-model="store.storeid" placeholder="请选择" style="width: 300px">-->
        <!--<el-option-->
        <!--v-for="item in store"-->
        <!--:key="item.value"-->
        <!--:label="item.id"-->
        <!--:value="item.id">-->
        <!--</el-option>-->
        <!--</el-select>-->
        <chart ref="chart2" :options="option" :auto-resize="true" style="width: 50vw;margin: 100px auto"></chart>
    </div>
</template>

<script>
    export default {
        name: "particular_order",
        data() {
            return {
                option: {
                    title: {
                        text: "详细订单数",
                        x: "center"
                    },
                    tooltip: {
                        trigger: "item",
                        formatter: "{a} <br/>{b} : {c}"
                    },
                    legend: {
                        x: 'left',
                        data: ["当前月", "上个月"]
                    },
                    xAxis: [
                        {
                            type: "category",
                            name: "x",
                            splitLine: {show: false},
                            data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"]
                        }
                    ],
                    yAxis: [
                        {
                            type: "log",
                            name: "y"
                        }
                    ],
                    toolbox: {
                        show: true,
                        feature: {
                            mark: {
                                show: true
                            },
                            dataView: {
                                show: true,
                                readOnly: true
                            },
                            restore: {
                                show: true
                            },
                            saveAsImage: {
                                show: true
                            }
                        }
                    },
                    calculable: true,
                    series: [
                        {
                            name: "上个月",
                            type: "line",
                            data: [1, 3, 9, 27, 81, 247, 741, 2223, 6669]

                        },
                        {
                            name: "当前月",
                            type: "line",
                            data: [1, 2, 4, 8, 16, 32, 64, 128, 256]

                        }
                    ]
                }
            }
        },
        mounted() {
            this.drawLine();
            this.option
        },
        methods: {
            drawLine: function () {
                //修改数据后重新调用他的加载方法
            }
        }
    }
</script>

<style scoped>

</style>